<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>extend</title>
    <script src="./node_modules/jquery/dist/jquery.js"></script>
</head>
<body>
测试 对象拷贝
<script>
    let o1 = [
        {
            name: 'gqq',
            age: '18'
        },
        {
            name: 'opp',
            age: '90'
        }
    ]

    let o2 = [
        {
            name: '刘德华',
            age: '87'
        }
    ]
    let o3 = [
        {
            name: 'gqq',
            age: '18'
        },
        {
            name: 'opp',
            age: '90'
        }
    ]

    let o4 = [
        {
            name: '刘德华',
            age: '87'
        }
    ]
    // 参数一 可以填 是否 deep 若不 浅拷贝 修改原对象 影响新数据 若 true 不影响了
    $.extend(o1, o2)
    o1[0].name = '哒哒哒我'
    console.log(o1)
    console.log(o2)

    $.extend(true, o3, o4)
    o3[0].name = '哒哒哒我'
    console.log(o3)
    console.log(o4)

</script>
</body>
</html>